import {BrowserModule} from '@angular/platform-browser';
import {NgModule} from '@angular/core';
import {FormsModule} from '@angular/forms';
import {AppComponent} from './app.component';
import {HeroServiceService} from './service/hero-service.service';
import {HeroDetailComponent} from './hero-detail/hero-detail.component';
import {HeroesComponentComponent} from './heroes-component/heroes-component.component';
import {RouterModule, Routes} from '@angular/router';
import {HeaderComponentComponent} from './header-component/header-component.component';
import {MenuComponentComponent} from './menu-component/menu-component.component';
import {CompanyListComponentComponent} from './company-list-component/company-list-component.component';
import {ConsumerComponent} from './consumer/consumer.component';

const appRoutes: Routes = [
  {path: 'h1', component: HeroesComponentComponent},
  {path: 'list', component: CompanyListComponentComponent},
  {path: 'consumer', component: ConsumerComponent}
];


@NgModule({
  declarations: [
    AppComponent,
    HeroDetailComponent,
    HeroesComponentComponent,
    HeaderComponentComponent,
    MenuComponentComponent,
    CompanyListComponentComponent,
    ConsumerComponent
  ],
  imports: [
    BrowserModule,
    FormsModule,
    RouterModule.forRoot(
      appRoutes,
      {enableTracing: true}
    )
  ],
  providers: [HeroServiceService],
  bootstrap: [AppComponent]
})
export class AppModule {
}
